package com.example.mask.maskmobilesshop.enums;

/**
 * 返回状态码
 * 
 * @ClassName: HttpStatus
 * @author: Xlh
 * @date 2017年1月18日 下午10:14:12
 */
public enum HttpStatus {

	MEMBER_NOT_EXIST(1000, "Member_Not_Exist"), // 会员不存在

	MEMBER_NOT_LOGIN(1003, "Member_Not_Login"), // 会员未登录

	CODE_EXPIRED(1001, "Code_Expired"), // 验证码已过期

	CODE_NOT_CORRECT(1002, "Code_Not_Correct"), // 验证码不正确

	SUCCESS(2000, "Success"), // 成功

	ERROR(2001, "Error"), // 异常

	BAD_PARAMETERS(3000, "Bad Parameters"), // 传入参数不正确

	PAY_ORDER_ERROR(4000, "Pay Error"), // 支付异常

	INTERNAL_SERVER_ERROR(5000, "Internal Server Error"), // 服务器异常

	STOCK_NOT_ENOUGH(6000, "Stock Not Enough"), // 库存不足

	MEMBER_COUPON_ERROR(7000,"MemberCoupon Error"),//优惠券异常
	
	ORDER_EXCEPTION(60001, "Order Exception"); // 订单提交异常
	
	private final int value;

	private final String reasonPhrase;

	private HttpStatus(int value, String reasonPhrase) {
		this.value = value;
		this.reasonPhrase = reasonPhrase;
	}

	public int getValue() {
		return value;
	}

	public String getReasonPhrase() {
		return reasonPhrase;
	}

	@Override
	public String toString() {
		return Integer.toString(this.value);
	}
}
